﻿using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
//引用命名空间
using System.Text;
public partial class _Default : System.Web.UI.Page 
{
    protected void Page_Load(object sender, EventArgs e)
    {

    }
    protected void BtnAppend_Click(object sender, EventArgs e)
    {
        if (this.TxtAppendStr.Text == "")
        {
            Response.Write("<script language=javascript>alert('对不起！文本框中不能为空！');location='javascript:history.go(-1)'</script>");
        }
        else
        { 
         //使用Append追加字符串
        String StrOldStr = this.LblOldStr.Text;
        StringBuilder sb4 = new StringBuilder(StrOldStr);
        String StrAppendStr = this.TxtAppendStr.Text;
        String s = sb4.Append(StrAppendStr).ToString();
        this.LblNewStr.Text = s;
        }
       
    }
}
